package com.yanqu.road.server.manager.zhaoshang.sort;

import com.yanqu.road.entity.zhaoshang.ZsProject;

import java.util.Comparator;

public class ZsSortOrderByAddTime implements Comparator<ZsProject> {

    @Override
    public int compare(ZsProject first, ZsProject last) {
        if(first.getOpenTime() > last.getOpenTime()){
            return -1;
        }else if(first.getOpenTime() < last.getOpenTime()){
            return 1;
        }
        return 0;
    }
}
